<?
function google_map_location_enterprise_options_setting_add_form() {
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Title'),
    '#maxlength' => 255,
    '#required' => TRUE,
  );
  $form['x'] = array(
    '#type' => 'textfield',
    '#title' => t('x'),
    '#maxlength' => 64,
    '#required' => TRUE,
	/*'#attributes' => array('readonly' => 'readonly'),*/
  );
  $form['y'] = array(
    '#type' => 'textfield',
    '#title' => t('y'),
    '#maxlength' => 64,
    '#required' => TRUE,
	/*'#attributes' => array('readonly' => 'readonly'),*/
  );
  $form['content'] = array(
    '#type' => 'textarea',
    '#title' => t('content'),
    '#maxlength' => 1024,
    '#required' => TRUE,
  );
  $form['format'] = filter_form();
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Add location'),
    
  );
  module_load_include('inc', 'google_map_location','google_map_location');
  $options = array(
   'key' =>variable_get('GOOGLE_KEY',GOOGLE_KEY),
   'center_x' => variable_get('GOOGLE_CENTER_X',GOOGLE_CENTER_X),
   'center_y' => variable_get('GOOGLE_CENTER_Y',GOOGLE_CENTER_Y),
   'map_width' => variable_get('GOOGLE_MAP_WIDTH',GOOGLE_MAP_WIDTH),
   'map_height' => variable_get('GOOGLE_MAP_HEIGTH',GOOGLE_MAP_HEIGTH),
   'zoom' => variable_get('GOOGLE_ZOOM',GOOGLE_ZOOM),
   'items' => load_gmap_location_options(),
   'id_google_map_location_add_x' =>'edit-x',
   'id_google_map_location_add_y' =>'edit-y',
   );
  $form['google_map'] = array(
    '#value' => theme('google_map_location_add', $options),
  );
  return $form;
}
function google_map_location_enterprise_options_setting_add_form_submit($form, &$form_state) {
  module_load_include('inc', 'google_map_location','google_map_location');
  $form_values = $form_state['values'];
  add_location(
    $form_values['title'],
    $form_values['x'],
    $form_values['y'],
    $form_values['content'],
	1
  );
  drupal_set_message(t('You configuration have been saved!'));
}
?>